<template>
  <div class="erweima" v-if="follow">
    <div class="erweima-container">
      <a class="close" @click="changeFollow">X</a>
      <div class="title">扫描一下二维码关注后才可以投票或报名哦。</div>
      <img src="../assets/images/follow.png" />
    </div>
  </div>
</template>
<style>
    .erweima{
   position: absolute;
   width:100%;
   height:100%;
   z-index:15;
   left:0;
   top:0;
   background:rgba(0,0,0,0.8);
   padding:0.5rem;
}
.erweima-container{
  background:#fff;
  border-radius:0.05rem;
  padding:0.15rem;
  position: relative;
}
.erweima-container img{
  width:100%;

}
.erweima-container .close{
  display: inline-block;
    width: 0.3rem;
    height: 0.3rem;
    background: #ff4081;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 0.3rem;
    font-size: 0.18rem;
    position: absolute;
    right: 0;
    top: 0;
    margin-right: -0.15rem;
    margin-top: -0.15rem;
    z-index: 999;
}
</style>
<script>
    export default{
        props: ['follow'],
        data(){
            return{
              follow:false
            }
        },
        methods:{
          changeFollow:function(){
            this.follow = false;
            console.log(this.follow);
            this.$emit('follow-status',this.follow);
          }
        },
        events: {
          'onChangeFollow': function(){
            this.changeFollow();
          }
        }

    }
</script>
